package com.travel.system.controller;

import com.travel.system.common.result.ResultInfo;
import com.travel.system.entity.Cuisine;
import com.travel.system.service.CuisineService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/tourism/www/cuisine")
@RequiredArgsConstructor
@Slf4j
@Tag(name = "美食相关接口")
@CrossOrigin
public class CuisineController {

    private final CuisineService service;

    @GetMapping("/getFive")
    ResultInfo<List<Cuisine>> getFive() {
        return ResultInfo.success(service.getFive());
    }

}
